/**
 * 
 */
package model.agent;

import static org.junit.Assert.*
import model.agent.AgentVariable;
import model.agent.AgentVariableInterface
import model.agent.question.QuestionSet;

import org.junit.After
import org.junit.AfterClass
import org.junit.Before
import org.junit.BeforeClass
import org.junit.Test

/**
 * @author lee
 *
 */
class AgentVariableTest {

	/**
	 * @throws java.lang.Exception
	 */
	@BeforeClass
	public static void setUpBeforeClass() throws Exception {
	}

	/**
	 * @throws java.lang.Exception
	 */
	@AfterClass
	public static void tearDownAfterClass() throws Exception {
	}

	/**
	 * @throws java.lang.Exception
	 */
	@Before
	public void setUp() throws Exception {
	}

	/**
	 * @throws java.lang.Exception
	 */
	@After
	public void tearDown() throws Exception {
	}

	@Test
	public void test() {
		AgentVariableInterface p = new AgentVariable("心气虚")
		
		
		assert(p.value == 0)
		assert(p.name == "心气虚")
		
		p.setValue(999)
		assert(p.value == 3)
		
		p.value = 999
		assert(p.value == 3)
		
		p.value = -1
		assert(p.value == 0)
		
		p.maxValue = 2
		p.value = 999
		assert(p.value == 2)
		
		p.value = 1
		p.value ++ 
		assert(p.value == 2)
		
		assert(p.toString() == "心气虚=2.0")
		
		p.setTimestamp(1)
		assert(p.timestamp == 1)
		
		p.timestamp ++ 
		assert(p.timestamp == 2)
		
		//println p.getExistentialQuestions().options
		
		
		
	}

}
